<%

     String firstName =(String)session.getAttribute("firstName");
     String lastName =(String)session.getAttribute("lastName");
        String format="";
        if(firstName!=null){


                        String temp=firstName+lastName;

                        if(temp.length()<15){
                                format= " "+firstName+" "+lastName;
                            }
                        else{
                                format=" "+firstName+" ";
                            }


                    }

       String data="";

       if(firstName==null){

                    data="<li><a href=\"login.jsp\">Login</a></li> <li><a href=\"register.jsp\">Sign Up</a></li></ul></nav></div></div>";
           }
       else{
                    data="<li><a href=\"profile.jsp\">"+format+"<br> Profile</a></li><li><a href=\"Logout.jsp\">Logout</a></li></ul></nav></div></div>";

                     session.setAttribute("copyfirstName",firstName);
                     session.setAttribute("copylastName",lastName);



       }
        out.print(data);

        

%>



